@import '~styles/settings.scss';

.c-area-of-interest-form {
  .input-field {
    max-width: rem(350px);
  }

  h1 {
    margin-bottom: rem(20px);
    font-weight: 300;
    font-size: 18px;

    @media screen and (min-width: $screen-m) {
      font-size: rem(36px);
      margin-bottom: rem(30px);
    }
  }

  b {
    font-weight: 500;
  }

  .aoi-map {
    height: 200px;
    position: relative;
    margin-bottom: rem(30px);
    margin-left: -25px;
    margin-right: -25px;
    width: calc(100% + 50px);

    @media screen and (min-width: $screen-m) {
      margin-left: 0;
      margin-right: 0;
      width: 100%;
      height: 300px;
    }
  }

  .alerts-image {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    width: 100%;
    background: $border;
    margin: rem(10px) 0 rem(30px);

    img {
      width: 100%;
    }

    p {
      margin: rem(20px);
    }

    @media screen and (min-width: $screen-m) {
      flex-direction: row;
      height: rem(160px);

      p {
        margin: 0 rem(30px) 0 rem(15px);
      }
    }
  }

  .webhook-actions {
    margin: -25px 0 25px;
    height: 20px;

    .test-webhook {
      color: $green-gfw;
      margin-right: rem(10px);
      font-style: italic;
      font-size: rem(12px);
      cursor: pointer;
      transition: color 0.1s ease-in-out;
      position: relative;
      padding-right: 20px;

      &:hover {
        color: darken($green-gfw, 10%);
      }

      .webhook-loader {
        width: 12px;
        height: 12px;
        left: unset;
        right: 0;
      }

      .spinner {
        width: 12px;
        height: 12px;
        border-width: 2px;
      }
    }

    .wh-success {
      color: $green-gfw;
    }

    .wh-error {
      color: $error;
    }
  }

  .submit-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;

    @media screen and (min-width: $screen-m) {
      flex-direction: row-reverse;
      justify-content: space-between;
    }
  }

  .area-submit {
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;

    .submit-btn {
      min-width: rem(180px);
    }
  }

  .delete-area {
    padding: 0;
    color: $error;
    width: 100%;

    @media screen and (min-width: $screen-m) {
      width: auto;
    }

    .delete-icon {
      margin-right: rem(5px);
      margin-top: rem(-1px);
      position: relative;
      fill: $error;
    }
  }

  .reset-form-btn {
    margin: auto;
    width: rem(200px);
    margin-top: rem(30px);
  }

  .public-area-field {
    padding-bottom: 30px;

    span {
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 4px;
      text-transform: uppercase;
      color: $slate-light;
      font-size: rem(15px);
      font-weight: 500;
    }

    p {
      padding-top: 10px;
      color: #a8a8a8;
    }
  }
}
